<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>common_util: 1. 软件环境</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">common_util
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

</div><!-- top -->
<div><div class="header">
  <div class="headertitle"><div class="title">1. 软件环境</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="anchor" id="autotoc_md25"></a> 在对本项目进行本地编译时，需要安装以下软件：</p>
<ol type="1">
<li>支持C++11及以上标准的编译器。(Visual Studio 2015或更高版本，GCC 4.8.1或更高版本，Clang 3.3或更高版本)</li>
<li>CMake 3.28.3 或更高版本。</li>
</ol>
<h1><a class="anchor" id="autotoc_md26"></a>
1.1. Windows</h1>
<h2><a class="anchor" id="autotoc_md27"></a>
1.1.1. 安装Visual Studio</h2>
<ol type="1">
<li><p class="startli">下载 Visual Studio 2015 或更高版本。 <a href="https://msdn.itellyou.cn/">https://msdn.itellyou.cn/</a></p>
<p class="startli"><img src="https://gitee.com/spencer_luo/common_util/raw/master/docs/quick_start/imgs/msdn_itellyou_win7_64.png" alt="" class="inline"/></p>
</li>
<li><p class="startli">安装下载好的Visual Studio 这里唯一需要注意的是：安装的时候选择“自定义”安装，只安装“Visual C++”相关的模块（如果你只用来开发C++相关的项目），否则安装时间会非常久。</p>
<p class="startli"><img src="https://gitee.com/spencer_luo/common_util/raw/master/docs/quick_start/imgs/visualstudio2015_4.png" alt="" class="inline"/> <img src="https://gitee.com/spencer_luo/common_util/raw/master/docs/quick_start/imgs/visualstudio2015_5.png" alt="" class="inline"/></p>
</li>
<li><p class="startli">测试验证</p>
<p class="startli">创建一个控制台应用程序，写一个打印"Hello World"的代码。然后编译运行，如果能正常打印出"Hello World"，则说明安装成功。</p>
</li>
</ol>
<h2><a class="anchor" id="autotoc_md28"></a>
1.1.2. 安装CMake</h2>
<ol type="1">
<li>安装 CMake 3.28.3 或更高版本。 <a href="https://cmake.org/download/">https://cmake.org/download/</a></li>
<li><p class="startli">安装下载好的CMake</p>
<p class="startli">这里需要注意的是：</p>
</li>
</ol>
<ul>
<li>选择“Add CMake to the system PATH”，将cmake添加到系统环境变量中，否则安装完后需要手动添加。 <img src="https://gitee.com/spencer_luo/common_util/raw/master/docs/quick_start/imgs/cmake.png" alt="" class="inline"/></li>
<li>建议自定义安装目录，目录名不能带空格和特殊字符。不然命令行执行时可能会遇到路径相关的问题。 <img src="https://gitee.com/spencer_luo/common_util/raw/master/docs/quick_start/imgs/cmake2.png" alt="" class="inline"/></li>
</ul>
<ol type="1">
<li><p class="startli">测试验证</p>
<p class="startli">打开命令行，输入 <code>cmake --version</code> ，如果能正常显示版本号，则说明安装成功。</p>
</li>
</ol>
<h1><a class="anchor" id="autotoc_md29"></a>
1.2. Linux(Ubuntu)</h1>
<h2><a class="anchor" id="autotoc_md30"></a>
1.2.1. 安装GCC编译器</h2>
<ol type="1">
<li>安装GCC 4.8.1</li>
</ol>
<div class="fragment"><div class="line">sudo apt update</div>
<div class="line">sudo apt install gcc</div>
</div><!-- fragment --><ol type="1">
<li>测试验证</li>
</ol>
<p>打开命令行，输入 <code>gcc --version</code> ，如果能正常显示版本号，则说明安装成功。</p>
<h2><a class="anchor" id="autotoc_md31"></a>
1.2.2. 安装CMake</h2>
<ol type="1">
<li>安装 CMake 3.28.3 或更高版本</li>
</ol>
<div class="fragment"><div class="line">sudo apt install cmake</div>
</div><!-- fragment --><ol type="1">
<li>测试验证</li>
</ol>
<p>打开命令行，输入 <code>cmake --version</code> ，如果能正常显示版本号，则说明安装成功。</p>
<h1><a class="anchor" id="autotoc_md32"></a>
1.3. MacOS</h1>
<h2><a class="anchor" id="autotoc_md33"></a>
1.3.1. 安装GCC编译器</h2>
<ol type="1">
<li>安装</li>
</ol>
<div class="fragment"><div class="line">brew install gcc</div>
</div><!-- fragment --><p>如果homebrew未安装，请先安装homebrew:</p>
<div class="fragment"><div class="line">/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;</div>
</div><!-- fragment --><ol type="1">
<li>测试验证</li>
</ol>
<p>打开命令行，输入 <code>gcc --version</code> ，如果能正常显示版本号，则说明安装成功。</p>
<h2><a class="anchor" id="autotoc_md34"></a>
1.3.2. 安装CMake</h2>
<ol type="1">
<li>安装 CMake 3.28.3 或更高版本</li>
</ol>
<div class="fragment"><div class="line">brew install cmake</div>
</div><!-- fragment --><ol type="1">
<li>测试验证</li>
</ol>
<p>打开命令行，输入 <code>cmake --version</code> ，如果能正常显示版本号，则说明安装成功。 </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
</small></address>
</body>
</html>
